import {NgModule,ModuleWithProviders} from "@angular/core";
import {HttpClientModule} from "@angular/common/http";
import {HttpHelper} from "./HttpHelper";
import {ManufactureService} from "./ManufactureService";
import {ImageService} from "./image.service";
import {ProductionBillService} from "./production.bill.service";
import {TimeSheetService} from "./time.sheet.service";
import {OperatorService} from "./operator.service";
import {ProcessService} from "./process.service";
import {ProductionProcessService} from "./production.process.service";
import {MaterialBillServices} from "./material.bill.service";
import {WorkShopService} from "./workshop.service";
import {ManufactureEntryService} from "./manufacture-entry.service";
import {StoreService} from "./store.service";
import {TransferEntryService} from "./transfer.entry.service";
import {StockService} from "./stock.service";
import {ManufactureFormService} from "./manufacture.form.service";

@NgModule({
    imports:[HttpClientModule],
})
export class ProductionServiceModule{
    static forRoot(apiUrl: string): ModuleWithProviders {
        return {
            ngModule: ProductionServiceModule,
            providers: [
                HttpHelper,
                ManufactureService,
                ImageService,
                ProductionBillService,
                TimeSheetService,
                OperatorService,
                ProcessService,
                ProductionProcessService,
                MaterialBillServices,
                WorkShopService,
                ManufactureEntryService,
                StoreService,
                TransferEntryService,
                StockService,
                ManufactureFormService,
                {provide: "apiUrl", useValue: apiUrl}
            ]
        }
    }
}